<?php

/**
 * helper
 * 
 * @author
 * @version 
 */
namespace Application\View\Helper;

use Zend\View\Helper\AbstractHelper;

/**
 * View Helper
 */
class RechercheCompactFormHelper extends AbstractHelper {
	
	public function __invoke() {
		$navHtml = <<<EOQ
			<div class="container">
	            <div class="row">
	                <div class="col-lg-12">
	                    <div class="back-container">
EOQ;

		// $navHtml .= $this->retourneHeaderRechercheForm();

		// $navHtml .= $this->retourneQuestionsForm();
		
		$navHtml .= <<<EOQ
						</div>
	                </div>
	            </div>
	        </div>
EOQ;

		return $navHtml;
	}

	private function retourneHeaderRechercheForm () {
		$navHtml = <<<EOQ
			<div class="row">
                <div class="col-lg-3">
                    <div class="btn-back">
                        <span class="glyphicon glyphicon-chevron-left"></span>
                        <a href="/"> Retour à la page de recherche </a>
                    </div>
                </div>
            </div>
EOQ;
		return $navHtml;
	}

	private function retournFiltresEnClair ( $value ) {

		$renderQuestionHtml = "<span>" . $value . "</span>";

		return $renderQuestionHtml;
	}

	private function retournBoutonModifierRecherche () {
		$renderQuestionHtml = <<<EOQ
			<span>
                <button class="btn btn-primary btn-search-fiche" ng-click="activerBlocRecherche ()">Modifier la recherche</button>
            </span>
EOQ;

		return $renderQuestionHtml;
	}

	private function retourneQuestionsForm () {
		$navHtml = <<<EOQ
			<div class="row" collapse="isCollapsed">
                <div class="col-lg-12">
                    <div class="panel panel-default panel-container">
                    	<div class="panel-body">
                      		<div class="row">                      			
EOQ;
		$navHtml .= $this->retournQuestion_Pays();

		$navHtml .= $this->retournQuestion_Regions();

		$navHtml .= $this->retournQuestion_Activites();

		$navHtml .= $this->retournBouton_Rechercher();

		$navHtml .= <<<EOQ
							</div>
						</div>
                    </div>
                </div>
            </div>
EOQ;
		return $navHtml;
	}

	private function retournQuestion_Pays () {
		$renderQuestionHtml = <<<EOQ
		<div class="col-lg-3">
			<select ng-show="filtres.paysUtil.length > 0" style="width:100%;" ui-select2 multiple ng-model="selectPays" data-placeholder="Sélectionner un Pays">
                <option ng-repeat="(key, pays) in filtres.paysUtil" ng-propriete="paysId" ng-value="{{pays.idPays}}" value="{{pays.idPays}}">{{pays.libellePays}}</option>
            </select>
        </div>
EOQ;

		return $renderQuestionHtml;
	}

	private function retournQuestion_Regions () {
		$renderQuestionHtml = <<<EOQ
		<div class="col-lg-3">
			<select ng-show="filtres.regionsUtil.length > 0" style="width:100%;" ui-select2 multiple ng-model="selectRegions" data-placeholder="Sélectionner une Région">
                <option ng-repeat="(key, region) in filtres.regionsUtil" ng-propriete="regionId" ng-value="{{region.idRegions}}" value="{{region.idRegions}}">{{region.libelleRegions}}</option>
            </select>
        </div>
EOQ;

		return $renderQuestionHtml;
	}

	private function retournQuestion_Activites () {
		$renderQuestionHtml = <<<EOQ
		<div class="col-lg-3">
			<select ng-show="filtres.activitesUtil.length > 0" style="width:100%;" ui-select2 multiple ng-model="selectActivite" data-placeholder="Sélectionner une Activité">
                <option ng-repeat="(key, activite) in filtres.activitesUtil" ng-propriete="activiteId" ng-value="{{activite.idAS}}" value="{{activite.idAS}}">{{activite.libelleAS}}</option>
            </select>
        </div>
EOQ;

		return $renderQuestionHtml;
	}

	private function retournBouton_Rechercher () {
		$renderQuestionHtml = <<<EOQ
		<div class="col-lg-1">
			<span>
                <button class="btn btn-default btn-search-action" ng-click="lancerRechercheRedirectionHomePage ()">Recherchez</button>
            </span>
        </div>
EOQ;

		return $renderQuestionHtml;
	}













}
